During development and use of software, various potential problems are often encountered, and a general solution to these problems is creating a patch of a source code level for the software. A hot patch is a code capable of fixing software vulnerabilities, and it has the following feature: running of the software is not interrupted and only functions to be changed in the source code need to be modified or replaced, that is, a program is analyzed to find out which function codes are changed, so that these function codes can be replaced. During the operation, functions are replaced to achieve a hot patch effect.
In the prior art, a method for identifying and locating a changed program code is divided into two different implementation solutions: one solution is identifying a changed program code by analyzing and comparing a difference between source codes of different versions and the other solution is identifying a changed program code by comparing binary files acquired after compiling of the programs. The first solution is relatively complex and has a lot of limitations, for example, a final compilation effect of an inline type function cannot be known, so that effective changed function codes cannot be extracted and the accuracy of identification cannot be ensured. In the second solution, both a program before patching and a program after patching need to be compiled, and then compiled binary codes are compared, which is relatively complex and time-consuming. In addition, this solution needs to use a lot of compiler options, some of the compiler options may conflict, so that the reliability of identification is affected.